﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using System.Data.SqlClient;
namespace DAL
{
    public class DichVu_DAL
    {
        private DataProvider _provider = new DataProvider();
	
		    public DichVu_DAL()
		    {
			    _provider.connect();
		    }
            public List<DichVu_DTO> DS_DichVu()
            {

                SqlDataReader reader = (SqlDataReader)_provider.executeQuery("DS_DichVu");

                List<DichVu_DTO> List_DV = new List<DichVu_DTO>();

                while (reader.Read())
                {
                    DichVu_DTO dv = new DichVu_DTO();
                    dv.MaDV = reader["MaDV"].ToString();
                    dv.TenDV = reader["TenDV"].ToString();
                   
                    List_DV.Add(dv);
                }
                reader.Close();
                return List_DV;
            }
    }
}
